package com.changgou.order.task;

import com.changgou.order.service.OrderItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author Jiang Yilin
 * @title: OrderStatisticTask
 * @projectName changgou_parent
 * @description: TODO
 * @date 2020/3/79:37
 */
@Component
public class OrderStatisticTask {

    @Autowired
    OrderItemService orderItemService;

    @Scheduled(cron = "0/10 * * * * ?")
//    @Scheduled(cron = "0 0 0 * * ?")
    public void countMoneyByCategory3(){
        orderItemService.countMoneyByCategory();
    }
}
